package com.yochi.pictureseditor.effects.converters;

import java.util.Locale;

public class BrightnessConverter implements ParameterConverter {

	private static final long serialVersionUID = -4344665879934286364L;

	public double convert(double parameter) {
		return parameter - 256;
	}
	
	public double convertInverse(double value) {
		return (256.0f/100.0f)*value + 256;
	}
	
	public String toDisplay(double parameter) {
		return String.format(Locale.FRANCE, "%.1f", (convert(parameter)/256)*100);
	}

}
